def quick_sort(arr):
    if(len(arr)<2):
        return arr
    else:
        pivot=arr[0]
        less=[i for i in arr[1:] if i<=pivot]
        greater=[i for i in arr[1:] if i>pivot]
        return quick_sort(less)+[pivot]+quick_sort(greater)
def main():
    arr=[5,3,6,2,10,1]
    print(quick_sort(arr))
if __name__=="__main__":
    main()